<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib prefix="his_fns" uri="/WEB-INF/tlds/his_fns.tld" %>
<script type="text/javascript">
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
</script>
    <div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#"   onclick="loadDiv('mainCenterDiv','${ctx}/blood/bloodComponent/index')">血液成分字典维护列表</a>
                </li>
                <li>
                    <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/blood/bloodComponent/form')">血液成分字典维护添加</a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="table-responsive no-border">
                        <div class="datatable-top">
                            <div class="pull-left">
                            	<form:form id="searchForm" modelAttribute="bloodComponent"  onsubmit="return loadDivForm('mainCenterDiv','searchForm','${ctx}/blood/bloodComponent/index');" method="post" class="form-inline">
                                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                    <div class="form-group">
                                        <label class=" control-label">名称：</label>
                                        <form:select path="bloodName" id="bloodName" htmlEscape="false" class="form-control" maxlength="64" data-parsley-required="true">
                                            <form:option value=""></form:option>
                                            <form:options items="${his_fns:getComponentList()}" itemLabel="bloodName" itemValue="id" htmlEscape="false" />
                                        </form:select>
                                    </div>
                                    <div class="form-group">
                                        <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" />
                                    </div>
                                </form:form>
                            </div>
                        </div>
                        <table id="contentTable" class="table table-bordered table-striped mg-t datatable">
                            <thead>
                                <tr>
                                    <th hidden>主键</th>
                                    <th>血液成分代码</th>
                                    <th>血液成分名称</th>
                                    <th hidden>输入码</th>
                                    <th>保存天数</th>
                                    <th>保存温度</th>
                                    <th>计量单位</th>
                                    <th>停止日期</th>
                                    <th>排序序号</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <c:forEach items="${page.list}" var="bloodComponent">
                                <tr>
                                        <td hidden> ${bloodComponent.id}</td>
                                        <td> ${bloodComponent.bloodCode}</td>
                                        <td> ${bloodComponent.bloodName}</td>
                                        <td hidden> ${bloodComponent.inputCode}</td>
                                        <td> ${bloodComponent.usefulLife}</td>
                                        <td> ${bloodComponent.temperature}</td>
                                        <td> ${bloodComponent.unit}</td>
                                        <td> ${bloodComponent.stopDate}</td>
                                        <td> ${bloodComponent.sort}</td>
                                    <td>
                                        <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/blood/bloodComponent/form?id=${bloodComponent.id}')" class="btn btn-success btn-xs">修改</a>
                                        <a href="#"  class="applyBt btn btn-danger btn-xs"
                                           onclick="confirmExtend('确认要删除该血液成分字典数据吗？',function(){delLoad('mainCenterDiv','${ctx}/blood/bloodComponent/delete?id=${bloodComponent.id}','${ctx}/sys/dict/index')})">删除</a>
                                    </td>
                                </tr>
                            </c:forEach>

                        </table>
                        <div class="pagination">${page}</div>
                    </div>
                </div>
            </section>
        </div>
    </div>
<script type="text/javascript">

</script>